package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


@Getter
@Setter
public class StockOutComeBill {

    // 订单状态做成固定的常量
    public static final Integer NO_AUDITED = 1;
    public static final Integer AUDITED = 2;


    // 出库类型做成固定的常量
    public static final Integer SALE = 1;
    public static final Integer GIFT = 2;

    private Long id;

    private String sn;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date vdate;

    private Integer status = NO_AUDITED;

    private BigDecimal totalAmount;

    private BigDecimal totalNumber;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date inputTime;

    private Employee inputUser;

    private Employee auditor;

    private Integer outType = -1;// 出库类型


    private List<StockOutcomeBillItem> items = new ArrayList<>();
}